<%-- 
    Document   : left
    Created on : Oct 6, 2011, 8:39:23 AM
    Author     : Rocker000
--%>

<%@page import="dao.DanhMuc_dao"%>
<%@page import="dao.LoaiSanPham_dao"%>
<%@page import="pojo.LoaiSanPham_pojo"%>
<%@page import="pojo.DanhMuc_pojo"%>
<%@page import="java.util.ArrayList"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<!--lấy danh sách danh mục-->
<%ArrayList<DanhMuc_pojo> dm = DanhMuc_dao.LayDanhSach();%>


<table width="100%" border="0" background="Image/left.jpg">
          <tr>
            <td valign="top">
            <%
            for(int i=0;i<dm.size();i++){%>                             
            <strong><font color ="red"> <%=dm.get(i).getTenDanhMuc()%></font></Strong>
            <!--lấy danh sách lại sản phẩm theo danh mục-->
            <% ArrayList<LoaiSanPham_pojo> ds_loaisanpham = LoaiSanPham_dao.LayDanhSach(String.valueOf(dm.get(i).getMaDanhMuc()));%>         
                <ul>
                  <% for(int j =0;j< ds_loaisanpham.size();j++)
                  {%>
                  <%String href="sanpham_controller?action=hienthidanhsachtheoloaisanpham&&madanhmuc="+ds_loaisanpham.get(i).getMaDanhMuc()+"&&maloaisanpham="+ds_loaisanpham.get(j).getMaLoaiSanPham(); %>                  
                  <a href=<%=href%> >
                        <li><%=ds_loaisanpham.get(j).getTenLoaiSanPham()%></li> 
                  </a>          
                  <%}%>                                                                           
                </ul>
            <%}%> 
               
           
           
            </td>
            
          </tr>
</table>
